﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using KSOAdmin.Models.MapperModels.Enums;
using KSOAdmin.Models.ViewModel;

namespace KSOAdmin.Core.Log
{
    /// <summary>
    /// 日志接口
    /// </summary>
    public interface ILogging
    {
        public void Info(string message);
        public void Info(LoggerType loggerType, string message = null);
        public void Info(LoggerType loggerType, string resposeParam, string ex = null, int status = 200, bool IsWaritText = false, View_Sys_User userInfo = null);

        public void Error(string message);
        public void Error(LoggerType loggerType, string message = null);
        public void Error(LoggerType loggerType, string resposeParam, string ex = null, int status = 500, bool IsWaritText = false, View_Sys_User userInfo = null);

        public void Waring(string message);
        public void Waring(LoggerType loggerType, string message = null);

        public void Waring(LoggerType loggerType, string resposeParam, string ex = null, int status = 200, bool IsWaritText = false, View_Sys_User userInfo = null);



        /// <summary>
        /// 错误日志
        /// </summary>
        /// <param name="msg">自定义消息</param>
        /// <param name="Url">请求的Url : HttpContext.Request.GetAbsoluteUri()</param>
        /// <param name="exp">错误 Exception </param>
        public void WriteError(object msg, int ID, string Url = "");

        public void WriteInfo(string msg, int ID, string Url = "");

        public void WriteWarn(string msg, string Url = "", string exp = null);

        public void Start();
    }
}
